package com.trustbook.visitor.log;

import android.util.Log;

/**
 * LogManager class will act as a Wrapper to Original Android logging. From this
 * class we can control when logging is enabled.
 * 
 * @author Rahul_Mittal
 * 
 */
public class LogManager {

	private static boolean isLoggable = true;

	/**
	 * Send a DEBUG log message.
	 * 
	 * @param tag
	 *            Used to identify the source of a log message. It usually
	 *            identifies the class or activity where the log call occurs.
	 * @param msg
	 *            The message you would like logged.
	 */
	public static void debug(String tag, String msg) {
		if (isLoggable) {
			Log.d(tag, msg);
		}
	}

	/**
	 * Send the ERROR log message
	 * 
	 * @param tag
	 * @param msg
	 * @param tr
	 */
	public static void error(String tag, String msg, Throwable tr) {
		// FlurryUtils.logAppExceptions("TAG:" + tag + " MESSAGE:" + msg, tr);
		Log.e(tag, msg, tr);
	}
}
